using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DataTransferObject;
using DataAccess;

namespace DataAccess
{
    public class clsNguoiDungDAO : clsDataAccessHelper
    {
        // Fields
        private String tenTable;

        // Contructors
        public clsNguoiDungDAO()
        {
            this.tenTable = "NHANVIEN";
        }
        #region Methods
        //-------------------------------------Lấy dữ liệu bảng-----------------------

        public DataTable SelectAll()
        {
            String sql;
            DataTable dt;
            try
            {
                sql = "SELECT * FROM " + this.tenTable;
                dt = new DataTable();
                dt = this.ExecuteQuery(sql);

                return dt;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        //-----------------------------------------------------------------------------//

        //public DataTable Search(String keyWord, int type)
        //{
        //    String sql;
        //    DataTable dt;
        //    try
        //    {
        //        sql = "SELECT * FROM " + this.tenTable;
        //        sql += ",

        //        switch(type)
        //        {
        //            case 0: sql
        //        }

        //        dt = new DataTable();
        //        dt = this.ExecuteQuery(sql);

        //        return dt;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        #endregion
    }
}
